home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
gt_power
/
gtuser11.zip
/
GTUSER.DOC
next >
Wrap
Text File
|
1991-02-06
|
5KB
|
109 lines
Documentation for GTUSER version 1.1 06/02/91
Copyright (C) 1990-91 Ted Harper
Free distribution and use of _unmodified_ source and executable
code expressly permitted.
GTUSER.PAS is a Turbo Pascal "unit" which accesses and parses the contents
of the GTUSER.BBS file set up by the GT-PowerComm communications program to
give "door" or "companion" programs information about the current user. Using
this unit in any programs you are writing will save "reinventing the wheel"
by writing code to determine user level, name, authorisations, etc.
It is very simple to use the unit in any door program; the following code is
a trivial example of all that is required to get the current user's
parameters and use them :
program Simple_Demo;
uses
GTUSER;
var
User_Details : GTUSER_BBS_Details;
begin
GetGTUSERDetails(User_Details);
writeln('User Name : ',User_Details.First_Name,' ',User_Details.Last_Name);
...
end.
The structure which is returned by the GTUSER unit contains the following
fields :-
User Level : Single letter code (0..z)
First Name,
Last Name : Two variable-length strings
Authorisations : a Pascal "set" containing all assigned privileges for user
DCE BPS Rate : The user's connect rate (or 0 for local testing)
DTE BPS Rate : Modem-CPU communications rate
ANSI : A boolean flag giving user preference
Last Date : When user was last on (separate day, month and year fields)
Limit : minutes remaining this call
Event : Time in minutes to next scheduled event
Current time : When the GTUSER.BBS file was created
A sample application of the GTUSER unit is provided in this archive. The
program GTUSERTS simply extracts the contents of the GTUSER.BBS and displays
them on the screen in an annotated, readable form.
This demonstration program may be useful to sysops running GT under DESQview.
Normally, when a user is running a doorway program (or an external comms
protocol such as DSZ), the GT status line is unavailable and they can't tell
who is currently on the system without starting a DOS task and viewing
GTUSER.BBS or the log file.
If GTUSERTS is set up as a DV window (use Add Program with supplied .DVP file
and change "program directory" accordingly), it can be run at any time by
the sysop (requires only 32k) in 4 keystrokes ("DESQ" "O" "GU" for example).
When ENTER is pressed, the screen is refreshed with possibly new user details
(as the program does _not_ automatically re-read the file periodically, to
avoid any file sharing problems with GT. If you enter "Q" and press ENTER,
the program terminates and closes its window.
The GTUSER will always obtain the GTUSER.BBS file via the GTPATH environment
variable. If you are running a multi-node system under DV and want to see
each separate user, you could create separate tasks for each session you
want to watch, and set a GTPATH in each prior to invoking GTUSERTS (in a
BAT file obviously!).
This multi-node "quirk" only applies to "supervisor" programs running in
a separate DV partition on multi-line GT host systems. Normal door programs
each only see their own private "world" and for them, the GTPATH will always
be correct.
All the source code to GTUSER and GTUSERTS is provided. Everything is written
in Turbo Pascal (5.5) and I feel it is fairly self-explanatory. I will be
progressively improving the operation and facilities of GTUSER, and will also
release various little "helpful" programs which make use of it as time permits.
Because I wish to retain ownership and control of these programs, you are
_not_ permitted to recompile or modify any of the supplied source code except
for your own use. That is, you may not redistribute, sell, or otherwise spread
around versions of my code which you have changed. Of course, you are free to
do what you wish with any of your own code which calls my routines, but mine
are _only_ to be used for further distribution in their "pristine"<grin>
state.
If you have any suggestions for improving the operation of GTUSER, or find a
<wince shudder> bug, drop me a message at either of the bulletin
boards below :-
The Big Apple The Poet's Dilemma
Sydney, Australia Sydney, Australia
GTNet 302/021 GTNet 302/000
Phone +61 2 764-3410 (24 hrs) Phone +61 2 804-6412 (24 hrs)
ted harper
06/02/91
Release History
---------------
0.8 11/11/90 Initial "alpha" release.
0.9 13/11/90 Corrections for latest GT host mode, where DCE and DTE
rates are returned; minor tidyups to GTUSERTS.
1.0 18/11/90 Swapped DCE and DTE values (I guessed wrong - thanks JD-T);
added multi-node DV info to docs; initial public release.
1.1 06/02/91 Correctly handle multiple blanks within GTUSER.BBS line;
Don't use FSearch routine because of undocumented feature.